'use strict'
import { QueryInterface, DataTypes } from 'sequelize'

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface: QueryInterface, Sequelize: typeof DataTypes) {
    await queryInterface.bulkInsert(
      'Attributes',
      [
        {
          name: 'iPhone15',
          categoryId: 1001,
          createdAt: new Date(),
          updatedAt: new Date(),
        },
        {
          name: 'iPhone16 pro',
          categoryId: 1001,
          createdAt: new Date(),
          updatedAt: new Date(),
        },
        {
          name: 'iPhone16 pro max',
          categoryId: 1001,
          createdAt: new Date(),
          updatedAt: new Date(),
        },
        {
          name: '小米15',
          categoryId: 1002,
          createdAt: new Date(),
          updatedAt: new Date(),
        },
        {
          name: 'ROG枪神9 Plus',
          categoryId: 2001,
          createdAt: new Date(),
          updatedAt: new Date(),
        },
        {
          name: '华硕灵耀14 air',
          categoryId: 2002,
          createdAt: new Date(),
          updatedAt: new Date(),
        },
      ],
      {},
    )
  },

  async down(queryInterface: QueryInterface, Sequelize: typeof DataTypes) {
    await queryInterface.bulkDelete('Attributes', [], {})
  },
}
